/* 
 * Copyright 2012 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.appspot.dispotrains.station;

import java.io.Serializable;
import java.util.Date;

public class Elevator implements Serializable {
	public final String code;
	public final String situation;
	public final String direction;
	public final String status;
	public final Date date;

	public Elevator(String code, String situation, String direction,
			String status, Date date) {
		this.code = code;
		this.situation = situation;
		this.direction = direction;
		this.status = status;
		this.date = date;
	}

	@Override
	public int hashCode() {
		return code.hashCode();
	}

	@Override
	public boolean equals(Object other) {
		if (!Elevator.class.isInstance(other)) {
			return false;
		}
		Elevator otherLine = (Elevator) other;
		return this.code.equals(otherLine.code);
	}

}
